package com.crm.mapper;

import com.crm.pojo.Cservice;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface serviceMapper {
    @Select("select * from cservice")
    List<Cservice> selectAll();
    @Select("select * from cservice where id=#{id}")
    Cservice selectById(int id);

    @Insert("insert into cservice(type, clientName, text, state, time, evaluate) VALUES (#{type},#{clientName},#{text},#{state},#{time},#{evaluate})")
    boolean add(Cservice service);

    @Update("update cservice set type=#{type},clientName=#{clientName},text=#{text},state=#{state},time=#{time},evaluate=#{evaluate} where id=#{id}")
    boolean update(Cservice service);

    @Delete("delete from cservice where id=#{id}")
    boolean delete(int id);
}
